package org.example.time.util;

/**
 * 时间区间
 *
 * @author YunKaiLuo
 * @date 2024/10/9
 */

import java.time.temporal.TemporalAccessor;

public class TimeInterval<T extends TemporalAccessor> {
    /**
     * 时间的起始值
     */
    private final T start;
    /**
     * 时间的停止值
     */
    private final T end;

    public TimeInterval(T start, T end) {
        this.start = start;
        this.end = end;
    }

    public T getStart() {
        return start;
    }

    public T getEnd() {
        return end;
    }

    @Override
    public String toString() {
        return "TimeInterval{" +
                "start=" + start +
                ", end=" + end +
                '}';
    }
}
